package com.power.sifa.std.dao;

import com.power.sifa.std.model.Std_tartype;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;

import javax.transaction.Transactional;
import java.io.Serializable;
import java.util.List;

/**
 * 被申请人类型 持久层(hibernate)
 */

public interface Std_tartypeDao extends JpaRepository<Std_tartype, Serializable>, JpaSpecificationExecutor<Std_tartype>, Repository<Std_tartype, Serializable>, Std_tartypeDaoCustom<Std_tartype, Serializable> {

    @Modifying
    @Transactional
    @Query("delete  from Std_tartype s where  s.id in (:ids) ")
    void removeByIds(@Param("ids") List<Integer> ids);

    @Query(" from Std_tartype s")
    List<Std_tartype> list();
}
